<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of utils
 *
 * @author GILLES
 */
class Cab_Utils {

    public static function cleanStr($string) {
        return ucwords(trim($string));
    }

    public static function setUcfist($data, $keys_exception = array()) {

        foreach ($data as $key => $value) {
            if (!in_array($key, $keys_exception)) {
                $data[$key] = self::cleanStr($value);
            } else {
                $data[$key] = trim($value);
            }
        }
        return $data;
    }

}

?>
